package com.sing.manager;

import com.sing.entity.Article;
import com.sing.entity.User;
import com.sing.mapper.ArticleMapper;
import com.sing.mapper.UserMapper;
import com.sing.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by yinhuachang on 2018/4/8.
 */
@Component
public class TestManager {

    @Autowired
    private UserMapper userMapper;

    @Autowired
    private ArticleService articleService;

    @Autowired
    private ArticleMapper articleMapper;


    public Article getUser(int id){
//        User user = userMapper.selectByPrimaryKey(id);
        Article article= articleService.selectById(1);
        Article article1= articleMapper.selectById(1);
        return article1;
    }
}
